//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    titleBarHeight:'',
    tabs: [],
    activeTab: 0,
  },
  onLoad: function (options) {
    var that = this;
    console.log(options)
    wx.getSystemInfo({
      success: function(res) {
        that.setData({titleBarHeight: res.statusBarHeight + 46})
      }
    })

    const titles = ['威士忌','品牌', '酒厂', '装瓶商']
    const tabs = titles.map(item => ({title: item}))
    console.log(tabs)
    this.setData({tabs})
  },
  onTabCLick(e) {
    const index = e.detail.index
    this.setData({activeTab: index})
  },

  onChange(e) {
    const index = e.detail.index
    this.setData({activeTab: index})
  },
  scrollCountry(e){
    console.log(e)
  }
})
